<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>输入框示例</title>
    <style>
        #inputBox {
            width: 100%;
            height: 80vh
        }
    </style>
</head>

<body>
    <label for="inputBox">请输入文本：</label>
    <textarea type="text" id="inputBox"></textarea>
    <button id="submitButton" type="button">提交</button>

    <script>
        const vscode = acquireVsCodeApi(); // 获取 VS Code API

        // 监听提交按钮的点击事件
        document.getElementById('submitButton').addEventListener('click', () => {
            // 获取输入框中的文本
            const text = document.getElementById('inputBox').value;
            // 通过 VS Code API 向插件发送用户的输入文本
            vscode.postMessage({
                command: 'submitInput',
                text: text
            });
        });
    </script>
</body>

</html>